package com.craigcmiller.cmtetris.core;


/**
 * MiniTetris main class
 * @author craig
 */
public class MiniTetris
{
	/**
	 * @param args
	 */
	public static void main(String[] args)
	{
		System.out.println("MiniTetris\nBy Craig Miller\n\nStarting\n");
		
		Board b=new Board(10, 20);
		
		IBlock lb=new IBlock(b);
		b.setBlock(lb);
		
		System.out.println("--- BOARD ---");
		System.out.println(b);
		
		lb.moveRight();
		lb.rotate();
		
		b.update();
		
		System.out.println("--- BOARD ---");
		System.out.println(b);
		
		lb.moveRight();
		lb.rotate();
		
		for (int i=0; i<60; i++) {
			b.update();
			
			System.out.println(b);
		}
		
		b.getActiveBlock().moveLeft();
		b.getActiveBlock().moveLeft();
		b.getActiveBlock().moveLeft();
		
		for (int i=0; i<15; i++) {
			b.update();
			
			System.out.println(b);
		}
		
		b.getActiveBlock().moveRight();
		
		for (int i=0; i<15; i++) {
			b.update();
			
			System.out.println(b);
		}
		
		b.getActiveBlock().rotate();
		b.getActiveBlock().moveRight();
		b.getActiveBlock().moveRight();
		b.getActiveBlock().moveRight();
		b.getActiveBlock().moveRight();
		b.getActiveBlock().moveRight();
		b.getActiveBlock().moveRight();
		
		for (int i=0; i<25; i++) {
			b.update();
			
			System.out.println(b);
		}
		
		b.getActiveBlock().rotate();
		b.getActiveBlock().moveRight();
		b.getActiveBlock().moveRight();
		b.getActiveBlock().moveRight();
		b.getActiveBlock().moveRight();
		b.getActiveBlock().moveRight();
		
		for (int i=0; i<8; i++) {
			b.update();
			
			System.out.println(b);
		}
	}
}
